require(['../config'], () => {
	require(['swiper', 'template', 'bootstrap', 'footer', 'Header'], (swiper, template) => {
		class List {
			constructor() {
				this.loadHtml().then(() => {
					this.title()
				})

			}

			loadHtml() {
				const id = location.search.slice(4)
				console.log(id)
				return new Promise((resolve) => {
					$.get(`http://www.xiongmaoyouxuan.com/api/tab/${id}?start=0`, (resp) => {
						if (resp.code === 200) {
							this.shopAllcontent = resp.data
							$('#shop-all').html(template('shop-allTemplate', { ...this.shopAllcontent
							}))
							resolve()
						}
					})
				})
			}

			title() {
					$('#list-title').html(template('list-boxTemplate', { ...this.shopAllcontent
					}))
					console.log(this.shopAllcontent)
					console.log('dd')
			}
		}
		new List()
	})
})
